<section id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article>

		<?php do_action( 'dazzling_before_post_header' ); ?>

			<?php do_action( 'dazzling_after_post_header' ); ?>

			<?php do_action( 'dazzling_before_post_content' ); ?>

		<?php
		if( has_post_thumbnail() ) {
			$image = '';
     		$title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) );
     		$image .= '<figure class="post-featured-image">';
  			$image .= '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">';
  			$image .= get_the_post_thumbnail( $post->ID, 'featured', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ) ) ).'</a>';
  			$image .= '</figure>';

  			echo $image;
  		}
			?>
		<header class="entry-header">
			<h2 class="entry-title">
				<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php the_title(); ?></a>
			</h2>
			</header>

			<div id="post-news" class="entry-content clearfix">
			<?php the_excerpt(); ?>
			<?php
			?>
			</div>

			<?php do_action( 'dazzling_after_post_content' ); ?>

			<?php do_action( 'dazzling_before_post_meta' ); ?>

			<div class="entry-meta-bar clearfix">
			<div class="entry-meta-homepage">
				<div class="posted-on"><div class="fa fa-calendar"></div><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>"> <?php the_time( get_option( 'date_format' ) ); ?></a></div>
				
				<?php if ( comments_open() ) { ?>
         			<div class="comments-link"><div class="fa fa-comment-o"></div><?php comments_popup_link( __( 'Leave a comment', 'dazzling' ), __( '1 Comment', 'dazzling' ), __( '% Comments', 'dazzling' ) ); ?></div>
         		<?php } ?>

				<?php if ( 'post' == get_post_type() ) : ?>
					<?php
						$categories_list = get_the_category_list( __( ', ', 'dazzling' ) );
						if ( $categories_list && dazzling_categorized_blog() ) :
					?>
					<div class="cat-links"><div class="fa fa-folder-open-o"></div>
						<?php printf( __( ' %1$s', 'dazzling' ), $categories_list ); ?>
					</div>
					<?php endif; ?>
				<?php endif; ?>
				
			</div>
			
		</div>

		<?php do_action( 'dazzling_after_post_meta' ); ?>

	</article>
</section>
